package com.fwmagic.dp._3._3_2;

/**
 * 抽象工厂模式
 */
public class Main {
    public static void main(String[] args) {
        AbstractCreator creator1 = new Creator1();
        AbstractProductA productA1 = creator1.createProductA();
        AbstractProductB productB1 = creator1.createProductB();

        productA1.doSomeThing();
        productB1.doSomeThing();

        System.out.println("=========================");

        AbstractCreator creator2 = new Creator2();
        AbstractProductA productA2 = creator2.createProductA();
        AbstractProductB productB2 = creator2.createProductB();

        productA2.doSomeThing();
        productB2.doSomeThing();

    }
}
